package com.my.pojo;

import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
* @Author: jiChen
* @Description: 会员实体类
* @Date: 2021/11/29 8:19 上午
*/

@Entity
@Getter
@Setter
@ToString
@RequiredArgsConstructor
@Table(name = "vip")
public class Vip {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "vip_id")
    private Integer vipId;

    @Column(name = "money")
    private Double money;

    @Column(name = "status")
    private Integer status;

    @OneToOne(mappedBy = "vip")
    @JoinColumn(name = "user_id")
    private User user;
}
